package java69.work717_2;

public class Book {
    private  String bookName;
    private  int bookId;
    private  String press;
    private  double price;
    public Book() {
    }
    public Book(int bookId,String bookName,String press,double price) {
        this.bookId = bookId;
        this.bookName = bookName;
        this.press = press;
        this.price= price;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public int getBookId() {
        return bookId;
    }

    public void setBookId(int bookId) {
        this.bookId = bookId;
    }

    public String getPress() {
        return press;
    }

    public void setPress(String press) {
        this.press = press;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public void report(){
        System.out.println("图书编号："+getBookId()+"，图书名称："+getBookName()+"，出版社："+getPress()+"，价格："+getPrice());
    }

    public static void main(String[] args) {
        Book[] book = new Book[]{
            new Book(1001,"史记","科海出版社",99.9),
                new Book(1002,"史记","科海出版社",99.9),
                new Book(1011,"史记","科海出版社",99.9),
                new Book(1301,"史记","科海出版社",99.9),
        };
        for (int i = 0; i <book.length ; i++) {
            book[i].report();
        }
    }
}
